package day3;

import java.util.Scanner;
//https://www.nowcoder.com/practice/bd891093881d4ddf9e56e7cc8416562d?tpId=182&tqId=34785&ru=/exam/oj
public class code1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String ret = "";
        String temp = "";
        for (int i = 0;i < str.length();i++) {
            if(str.charAt(i) <= '9' && str.charAt(i) >= '0') {
                temp += str.charAt(i);
            }else {
                if(temp.length() > ret.length()) {
                    ret = temp;
                    temp = "";
                }else {
                    temp = "";
                }
            }
        }

        System.out.println(ret);
    }
}
